﻿using System;
using System.ComponentModel;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace WenSkin.Controls
{
    [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.All), DefaultEvent("ValueChanged")]
    [Designer("System.Windows.Forms.Design.ToolStripItemDesigner")]
    public class ToolStripRadioButton : ToolStripControlHost
    {
        public ToolStripRadioButton() : base(new RadioButton())
        {
            RadioButton.Click += RadioButton_Click;
        }

        public new event EventHandler Click;
        private void RadioButton_Click(object sender, EventArgs e)
        {
            Click?.Invoke(sender, e);
        }

        [Category("Wen"), Description("是否选中")]
        public bool Checked { get => RadioButton.Checked; set => RadioButton.Checked = value; }
        public RadioButton RadioButton { get => (RadioButton)Control; }
    }
}
